package ch3;

import java.util.*;

public class JiangXuejin {

	public static void main(String[] args) {
		double principle, structure, high, avg;
		Scanner input = new Scanner(System.in);// 键盘输入
		System.out.print("请输入计算机组成原理成绩:");
		principle = input.nextDouble();// 从键盘输入中获得一个数
		System.out.print("请输入数据结构成绩:");
		structure = input.nextDouble();// 从键盘输入中获得一个数
		System.out.print("请输入高数成绩:");
		high = input.nextDouble();// 从键盘输入中获得一个数
		avg = (principle + structure + high) / 3;// 计算获得3个数的平均值
		if (avg > 80 && (principle >= 60 && structure >= 60 && high >= 60)) {
			System.out.println("奖学金");
		} else if (principle >= 60 && structure >= 60 && high >= 60) {
			System.out.println("考试通过，没有奖励");
		} else if (principle >= 60 && structure >= 60 || structure >= 60 && high >= 60
				|| principle >= 60 && high >= 60) {
			System.out.println("一门课不及格，下学期缴费补考");
		} else {
			System.out.println("两门及以上不及格，留级");
		}
	}

}
